package com.teaching.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.teaching.entity.User;

@Controller
public class PagesController {
	// 请求登录页面
	@RequestMapping("loginPage")
	public String loginPage() {
		System.out.println("HomePage Controller: login Page");
		return "loginPage";
	}
	
	// 请求注册页面
	@RequestMapping("registerPage")
	public String registerPage() {
		System.out.println("HomePage Controller: register Page");
		return "registerPage";
	}


    //修改密码页面
	@RequestMapping("passwordPage")
	public String passwordPage() {
		System.out.println("HomePage Controller: password Page");
		return "passwordPage";
	}
	
	//个人主页
	@RequestMapping("selfPage")
	public String selfPage(Integer userType) {
		System.out.println("userType:"+userType);
		if(userType==1) {
			return "teacherPage";
		}
		return "studentPage";
	}
	

	@RequestMapping("teacherModifyPage")
	public String teacherModifyPage() {
		System.out.println("PagesController: teacherModifyPage");
		return "teacherModifyPage";
	}
	
    @RequestMapping("feedbackPage")
    public String feedbackPage() {
		System.out.println("feedbackPage");
		return "feedbackPage";	
    }
}